<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class ZadanPlayerinfo extends Validate
{
    protected $rule = ['opennum' => 'require|number','cjcoin' => 'require|number','isdefaultcoin' => 'require|number',
    ];

    protected $message = ['opennum.require' => '开启盲盒次数为必填项','opennum.number' => '开启盲盒次数需为数字','cjcoin.require' => '超级金币数量为必填项','cjcoin.number' => '超级金币数量需为数字','isdefaultcoin.require' => '是否赠送(1.未赠送 2.已赠送)为必填项','isdefaultcoin.number' => '是否赠送(1.未赠送 2.已赠送)需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['opennum','cjcoin','isdefaultcoin',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['opennum','cjcoin','isdefaultcoin',]);
    }
}
